// 月卡管理相关接口
import request from '@/utils/request'


export function getCardListAPI(params) {
    return request({
        url: '/parking/card/list',
        method: 'GET',
        params
    })
}

// 新增月卡
export function createCardAPI(data) {
    return request({
        url: '/parking/card',
        method: 'POST',
        data
    })
}

// 获取详情
export function getDetailAPI(id) {
    return request({
        url: `/parking/card/detail/${id}`,
    })
}

// 更新月卡
export function updateCardAPI(data) {
    return request({
        url: '/parking/card/edit',
        method: 'PUT',
        data
    })
}

// 删除月卡
export function deleteCardAPI(id) {
    return request({
        url: `/parking/card/${id}`,
        method: 'DELETE'
    })
}

// 批量删除月卡
export function deleteManyCardAPI(ids) {
    return request({
        url: `/parking/card/${ids.join(',')}`,
        method: 'DELETE'
    })
}